Reviewing my old .NET web app
Arabic Learning Institute
One of the earliest lessons I adopted from networking with others was to focus on one, over many little ones, to achieve quality and depth. I have built a couple of web apps by the time I arranged a meeting with one of my senior brothers, Khalid (who went on to work at Microsoft). I asked eagerly for advise on how to tackle the overload of information I was facing from .NET and having to balance between two paths: React and Javascript, vs .NET and C#.
Khalid told me to focus on one project per path and build out things step by step. Just keep on adding features from the perspective of a user one by one, and you’ll be surprised by how many technical things you learn organically.
I kept to this advice, and continue to do so today. I had two projects:
- YouTube Playlists Organiser, now renamed Mira. Focused on React, Node and JavaScript and all of modern Front End development. Used MongoDB.
- Learning Arabic Web, for a hypothetical Arabic Learning Institute client. Focused on C# and .NET, along with EF Core, and MySQL. Entirely focused on Back End development.
Unsurprisingly, Learning Arabic Web (which I shall be reviewing) was paused sometime after I became focused on being a Front End developer. The responsibilities — both personal and professional — just overpowered my capacity to dig for solutions to problems unguided.
Intention for starting Learning Arabic Web
- New to the industry, need to enter the industry professional via C# & .NET
- Need to showcase application of knowledge to potential employers
- Need to convince myself that I indeed learnt something and can walk alone (without tutorials)
- Need to become comfortable with what I acquired
- Need to save time and gain the most depth
Lessons learnt
- You can only go so far in learning alone
- You can’t build the best if you’ve never worked with others, those who know better than you.
- It is one thing to read a manual, and another to implement
- You can’t keep up the same energy for something that can’t be validated
- You will encounter plenty of errors which introduce new areas of awareness for you
- You build something better than 100 broken pieces
- You expose yourself to plethora of tools and concepts, that you’ll encounter in the future
- You will have an easier time picking up terminology and will have a lot of Aha! moments
- You will make mistakes, like posting env secrets to GitHub!
- You will become proficient in the tools: IDE, source control, deployment hosts etc
Technical review
- It is a .NET Core MVC project with a mishmash of packages, libraries, patterns and youthful ignorance spread across the codebase.
- It comprises of:
- Authorization (with email, google, okta) through OpenID Connect protocol
- Sql Server (incorrectly uses it), and sql commands all over the place
- EF Core but doesn’t use it correctly
- Repository pattern or what appears to be like it
- Mixture of Api and Page Controllers
- Accidental commit leaking GoogleOpenID credentials
- A littered startup file
- No sign of implementing any Clean Code techniques
- Inadequate usage of Dependency Injection, especially with regards to DB connections
- A lot of wild guesses
As much as I want to be kind to myself, this project is far from being clean, and straightforward. You’ll see good things but also things that are half-baked, spaghetti code in the making. At the end, you just think — what did you expect from a newbie with no one to guide them in a structured manner? Spaghetti code is the best result.
To the credit of my younger self, this project does make my journey towards becoming a full-stack developer quicker and smoother - I have a reference point for things I may have done wrong or struggled to understand. Which other newbie has a past history with the thing they are trying to learn?
Off we go 🚀